package com.itheima.extendsconstructor;

//子类
//继承的优点：代码复用
public class Teacher extends Person {

    private String title;

    public Teacher() {

    }

    public Teacher(String name, int age, String gender, String title) {
        super(name, age, gender);
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
